import App from './App';
import * as Pinia from 'pinia';
import service from './lib/service.js';
import './uni.promisify.adaptor';
import uviewPlus from '@/uni_modules/uview-plus';
// 导入pinia
import pinia from '@/store';
import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin';
// #ifndef VUE3
import Vue from 'vue';
Vue.config.productionTip = false;
App.mpType = 'app';

const app = new Vue({
  ...App,
});
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue';
export function createApp() {
  const app = createSSRApp(App);
  app.mixin(ZPMixin);
  app.use(pinia);
  app.use(uviewPlus);
  // uni.$URL = 'http://192.168.31.20:8089';
  uni.$URL = 'http://www.cddzixun.com';
  uni.$serverUrl = 'http://api.cddzixun.com';
  uni.$appId = 'wx988763b66e8b3e26';
  uni.$request = service;
  return {
    app,
  };
}
// #endif
